import request from "@/utils/request"
// 查询用户列表
export const getUserList = (params: any
) => {
    return request({
        url: '/system/user/list',
        method: 'get',
        params: params,
    })
}
// 查询用户详细
export const getUser = (id: number
) => {
    return request({
        url: `/system/user/${id}`,
        method: 'get'
    })
}
// 修改用户信息
export const upUser = (data: any
) => {
    return request({
        url: "/system/user/up",
        method: 'put',
        data: data
    })
}
// 修改用户角色
export const upUserRole = (data: any
) => {
    return request({
        url: "/system/user/upRole",
        method: 'put',
        data: data
    })
}
//删除用户
export const deleteUsers = (ids: any[]
) => {
    return request({
        url: `/system/user/${ids}`,
        method: 'delete'
    })
}
//获取本人信息
export const getuserInfo = (
) => {
    return request({
        url: "/userInfo/myInfo",
        method: 'get'
    })
}
//修改本人信息
export const upUserInfo = (data: any
) => {
    return request({
        url: "/userInfo/upMyInfo",
        method: 'put',
        data: data
    })
}
//修改本人信息
export const upUserPass = (data: any
) => {
    return request({
        url: "/userInfo/upPassword",
        method: 'put',
        data: data
    })
}